package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.EmpInfoStatus;
import org.jsola.hr.constant.FormalTypeEnum;
import org.jsola.hr.constant.PostType;

import java.util.Date;

import static org.jsola.hr.example.EmpChangesExample.*;
import static org.jsola.hr.example.EmpInfoExample.*;

/**
 * @author zhenghua
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "员工更换公司")
@Data
public class EmpChangeCompanyDTO extends BaseDTO {

    @ApiModelProperty(notes = N_EMP_ID, example = E_EMP_ID)
    @Length(max = 32, message = M_EMP_ID_MAX)
    private String empId;

    @ApiModelProperty(notes = "调出的公司Id")
    private String companyId;

    @ApiModelProperty(notes = "员工姓名")
    private String name;

    @ApiModelProperty(notes = "要调入的公司Id")
    private String currentCompanyId;

    @ApiModelProperty(notes = "岗位类型( 1劳务派遣 2外包 3社保代缴 4薪资代发)", example = E_POST_TYPE, allowableValues = PostType.VALUES_STR)
    @Const(constClass = PostType.class, message = M_POST_TYPE_ENUM_NOT_MATCH)
    private Integer currentPostType;

    @ApiModelProperty(notes = "入职时间", example = E_JOIN_DATE)
    private Date currentJoinDate;

    @ApiModelProperty(notes = "入职城市ID", example = E_JOIN_CITY_CODE)
    @Length(max = 50, message = M_JOIN_CITY_CODE_MAX)
    private String currentJoinCityCode;

    @ApiModelProperty(notes = "员工状态", example = E_FORMAL_TYPE, allowableValues = FormalTypeEnum.VALUES_STR)
    @Const(constClass = FormalTypeEnum.class, message = M_FORMAL_TYPE_ENUM_NOT_MATCH)
    private Integer currentFormalType;

    @ApiModelProperty(notes = "转正时间", example = E_TURN_STRAIGHT_DATE)
    private Date currentTurnStraightDate;

    @ApiModelProperty(notes = "聘用形式（0：非正式，1：正式）", example = E_EMPLOY_TYPE)
    private Boolean currentEmployType;

    @ApiModelProperty(notes = "员工状态（1：待入职，2：入职，3：待离职，4：离职）", example = "1", allowableValues = EmpInfoStatus.VALUES_STR)
    @Const(constClass = EmpInfoStatus.class, message = M_STATUS_ENUM_NOT_MATCH)
    private Integer currentStatus;

    @ApiModelProperty(notes = "入职城市", example = E_JOIN_CITY_NAME)
    @Length(max = 100, message = M_JOIN_CITY_NAME_MAX)
    private String currentJoinCityName;

    @ApiModelProperty(notes = "预计入职时间", example = E_PRE_JOIN_DATE)
    private Date currentPreJoinDate;

    @ApiModelProperty(notes = "要入职的岗位id(多个用,分隔)", example = E_PRE_JOIN_POSITION)
    @Length(max = 255, message = M_PRE_JOIN_POSITION_MAX)
    private String currentPreJoinPosition;

    @ApiModelProperty(notes = "要入职的部门id(多个,分隔)", example = E_PRE_JOIN_DEP)
    @Length(max = 255, message = M_PRE_JOIN_DEP_MAX)
    private String currentPreJoinDep;

    @ApiModelProperty(notes = "试用期天数", example = E_PROBATION_DAYS)
    private Integer currentProbationDays;

    @ApiModelProperty(notes = "预计离职时间")
    private Date preQuitDate;

}
